scl = 10
posx = range(scl*3,720,scl/2)
posy = range(scl*68,scl*75,scl/2)	
fo = open("inp","r")
print " %!PS-Adobe-3.0 EPSF-3.0\n"
x = 0
y = 0
y1 = 0
pal = 0
def nota():
	print "newpath\n"
	print str(x) + " " + str(y) + " moveto\n"
	print str(x) + " " + str(y1) + " lineto\n\
	1 setlinewidth\n\
	stroke\n"
rl = fo.readline()
sp = rl.split()
px = 0
for el in sp:
	for ea in el:
		if ea == "C":
			x = posx[px]
			y = posy[0]
			y1 = posy[0]+scl*4
			not1 = posy[0]
			not2 = posy[0]
			pal = not1 + not2 - posy[2]
			pal = posy[0] - pal
			y1 = (posy[0]+scl*4)-pal
		elif ea == "D":
			x = posx[px]
			y = posy[1]
			pal = not1 + not2 - posy[2]
			pal = posy[1] - pal
			y1 = (posy[1]+scl*4)-pal
		elif ea == "E":
			x = posx[px]
			y = posy[1]
			pal = not1 + not2 - posy[2]
			pal = posy[1] - pal
			y1 = (posy[1]+scl*4)-pal	
		elif ea == "F":
			x = posx[px]
			y = posy[2]
			pal = not1 + not2 - posy[2]
			pal = posy[2] - pal
			y1 = (posy[2]+scl*4)-pal
		nota()
		px = px + 2
print "%%EOF"
fo.close()
